import { getAjax, putAjax, patchAjax, postAjax, deleteAjax } from './myapi' 
const api = { 

	// 获取个人信息
	userinfo_list: (params) => getAjax('/userinfo/', params),
	// 获取地址列表
	wechat_addr_list: (params) => getAjax('/wechat/addr/', params),
	// 创建地址
	wechat_addr_create: (data) => postAjax('/wechat/addr/', data),
	// 检索某个地址
	wechat_addr_read: (params) => getAjax('/wechat/addr/' + params['id'] + '/', {}),
	// 更新地址(整体更新)
	wechat_addr_update:(data) => putAjax('/wechat/addr/' + data['id'] + '/', data),
	// 修改局部数据(局部更新)
	wechat_addr_partial_update:(data) => patchAjax('/wechat/addr/' + data['id'] + '/', data),
	// 删除地址
	wechat_addr_delete: (data) => deleteAjax('/wechat/addr/' + data['id'] + '/', {}),
	// 获取轮播图列表
	wechat_banner_list: (params) => getAjax('/wechat/banner/', params),
	// 微信余额支付接口
	wechat_blpay_create: (data) => postAjax('/wechat/blpay/', data),
	// 获取整个购物车
	wechat_cart_list: (params) => getAjax('/wechat/cart/', params),
	// 创建购物车商品
	wechat_cart_create: (data) => postAjax('/wechat/cart/', data),
	// 检索某购物车商品
	wechat_cart_read: (params) => getAjax('/wechat/cart/' + params['id'] + '/', {}),
	// 更新购物车商品(整体更新)
	wechat_cart_update:(data) => putAjax('/wechat/cart/' + data['id'] + '/', data),
	// 修改局部数据(局部更新)
	wechat_cart_partial_update:(data) => patchAjax('/wechat/cart/' + data['id'] + '/', data),
	// 删除购物车商品
	wechat_cart_delete: (data) => deleteAjax('/wechat/cart/' + data['id'] + '/', {}),
	// 获取收藏列表
	wechat_collect_list: (params) => getAjax('/wechat/collect/', params),
	// 检索某个收藏
	wechat_collect_read: (params) => getAjax('/wechat/collect/' + params['id'] + '/', {}),
	// 删除收藏
	wechat_collect_delete: (data) => deleteAjax('/wechat/collect/' + data['id'] + '/', {}),
	// 获取系统字典列表
	wechat_confdict_list: (params) => getAjax('/wechat/confdict/', params),
	// 检索某个系统字典
	wechat_confdict_read: (params) => getAjax('/wechat/confdict/' + params['id'] + '/', {}),
	// 获取商品列表
	wechat_good_list: (params) => getAjax('/wechat/good/', params),
	// 检索某个商品
	wechat_good_read: (params) => getAjax('/wechat/good/' + params['id'] + '/', {}),
	// 获取评论列表
	wechat_goodcomment_list: (params) => getAjax('/wechat/goodcomment/', params),
	// 检索某个评论
	wechat_goodcomment_read: (params) => getAjax('/wechat/goodcomment/' + params['id'] + '/', {}),
	// 获取评论列表
	wechat_mycomment_list: (params) => getAjax('/wechat/mycomment/', params),
	// 更新评论(整体更新)
	wechat_mycomment_update:(data) => putAjax('/wechat/mycomment/' + data['id'] + '/', data),
	// 检索某个评论
	wechat_mycomment_read: (params) => getAjax('/wechat/mycomment/' + params['id'] + '/', {}),
	// 修改局部数据(局部更新)
	wechat_mycomment_partial_update:(data) => patchAjax('/wechat/mycomment/' + data['id'] + '/', data),
	// 获取订单列表
	wechat_order_list: (params) => getAjax('/wechat/order/', params),
	// 创建订单
	wechat_order_create: (data) => postAjax('/wechat/order/', data),
	// 检索某个订单
	wechat_order_read: (params) => getAjax('/wechat/order/' + params['id'] + '/', {}),
	// 取消订单(整体更新)
	wechat_order_update:(data) => putAjax('/wechat/order/' + data['id'] + '/', data),
	// 取消订单(局部更新)
	wechat_order_partial_update:(data) => patchAjax('/wechat/order/' + data['id'] + '/', data),
	// 更新用户信息(整体更新)
	wechat_updateuser_update:(data) => putAjax('/wechat/updateuser/' + data['id'] + '/', data),
	// (局部更新)
	wechat_updateuser_partial_update:(data) => patchAjax('/wechat/updateuser/' + data['id'] + '/', data),
	// 用户收藏接口
	wechat_usercollect_create: (data) => postAjax('/wechat/usercollect/', data),
	// 微信登录接口
	wechatlogin_create: (data) => postAjax('/wechatlogin/', data),
}
export default api